package com.iclient.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.iclient.dao.service.NavService;

@Controller
public class NavController {
	
	@Autowired
	private NavService navService;
	
	@RequestMapping(value="/nav/list.json")
	@ResponseBody
	public ModelMap list(){
		ModelMap modelMap = new ModelMap();
		modelMap.addAttribute("data", navService.findNavTree());
		return modelMap;
	}

}
